var express=require('express');
var path=require('path');
var ejs = require('ejs');
var mongoose=require('mongoose');
var app=express();
app.listen(8027);
console.log(8027);
app.set('views','./views');
app.engine('html', ejs.renderFile)
app.set('view engine', 'html');
// 静态资源请求路径
app.use(express.static(path.join(__dirname,'public')))
app.get('/',function(req,res){
	var a='test';
	var b='name';
	res.render('index.html',{
		title:'这是博客首页',
		names:['a','n','c']
	     
	})
})
app.get('/list.html',function(req,res){
	res.render('list.html',{
		title:'列表页'
	})
})
app.get('/detail.html',function(req,res){
	res.render('detail.html',{
		title:'详情页'
	})
})
app.get('/404.html',function(req,res){
	res.render('404.html',{
		title:'404'
	})
})
